<?php
/* @var $model Ad */
/* @var $this AdController */
?>

<?php
if (isset($model) && !isset($notOwn)) {

    if ($model instanceof Equipment) {
	$this->renderPartial('_edit/equipment', array('model' => $model, 'aCatAds' => $aCatAds));
    } elseif ($model instanceof Resume) {
	$this->renderPartial('_edit/resume', array('model' => $model, 'aCatAds' => $aCatAds));
    } elseif ($model instanceof Job) {
	$this->renderPartial('_edit/job', array('model' => $model, 'aCatAds' => $aCatAds));
    } elseif ($model instanceof Supply) {
	$this->renderPartial('_edit/supply', array('model' => $model, 'aCatAds' => $aCatAds));
    }
//    elseif ($model instanceof CompanySource) {
//
//	if (!$model->eBlast) {
//	    $model->eBlast = new Eblast();
//	}
//	$this->renderPartial('_edit/company_source', array('model' => $model, 'eblast' => $model->eBlast, 'aCatAds' => $aCatAds));
//    }
    elseif ($model instanceof Vendor) {
	if (!$model->eBlast) {
	    $model->eBlast = new Eblast();
	}
	$this->renderPartial('_edit/vendor', array('model' => $model, 'eblast' => $model->eBlast, 'aCatAds' => $aCatAds));
    } elseif ($model instanceof Technical) {
	if (!$model->eBlast) {
	    $model->eBlast = new Eblast();
	}
	$this->renderPartial('_edit/technical', array('model' => $model, 'eblast' => $model->eBlast, 'aCatAds' => $aCatAds));
    } elseif ($model instanceof Advertise) {
	$this->renderPartial('_edit/advertise', array('model' => $model, 'aCatAds' => $aCatAds));
    }
} else {
    ?>
    <div class="alert alert-error"><strong>Error!</strong> You don't have permission to edit this post.</div>
    <?php
}
?>
